package org.mydba.info;

/**
 * Stores an Oracle session statistic.
 *
 * @since 1.0
 */
public class OracleStatistic {
    private int id;
    private long value;

    public OracleStatistic(final int id, final long value) {
        this.id = id;
        this.value = value;
    }

    public int getId() {
        return id;
    }

    public long getValue() {
        return value;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        OracleStatistic that = (OracleStatistic) o;

        if (id != that.id) {
            return false;
        }
        if (value != that.value) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (int) (value ^ (value >>> 32));
        return result;
    }
}
